package main.chapter7

fun main() {
    val arrayList = ArrayList<String>()
    arrayList.add("Hello")
    arrayList.add("World")
    arrayList.remove("World")
    arrayList.removeAt(0)

    //内部并没有实现add和remove
    val list = listOf<String>("Hello", "World")

    //没有put方法
    val map = mapOf("key" to "value")

    //mutable的有put等方法
    val mutableMap = mutableMapOf("key" to "value", "key1" to "value2")
    mutableMap["key3"] = "value3"
    println(mutableMap["key"])
}